package com.itheima.controller.oms;


import com.itheima.core.R;
import com.itheima.pojo.oms.OmsOrderSetting;
import com.itheima.service.oms.OmsOrderSettingSrevice;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/orderSetting")
public class OmsOrderSettingController {
    @DubboReference
    private OmsOrderSettingSrevice omsOrderSettingSrevice;


    /*修改指定订单设置*/
    @PostMapping("/update/{id}")
    public R updateID(@PathVariable int id , @RequestBody OmsOrderSetting omsOrderSetting){
        omsOrderSettingSrevice.updateID(id,omsOrderSetting);
        return R.success();
    }
    /*获取指定订单设置*/
    @GetMapping("/{id}")
    public R getById(@PathVariable int id){
        OmsOrderSetting byId = omsOrderSettingSrevice.getById(id);
        return R.success("",byId);
    }
}
